package cn.dust.design.pattern.behavioral.observer.zhandui;

public class Player implements Observer{
    private String name;

    public Player(String name) {
        this.name = name;
    }

    @Override
    public String getName() {
        return this.name;
    }

    @Override
    public void setName(String name) {
        this.name=name;
    }

    @Override
    public void help() {
        System.out.println(name+"来救你");
    }

    @Override
    public void qiujiu(Zhandui zhandui) {
        System.out.println(name+"要死");
        zhandui.tongzhi();
    }
}
